package com.ruoyi.qd.task;

import cn.hutool.core.date.DateUtil;
import com.mybatisflex.core.query.QueryMethods;
import com.ruoyi.quartz.domain.SysJobLog;
import org.springframework.stereotype.Component;

@Component("deleteDataTask")
public class DeleteDataTask {
    /**
     * 删除定时任务日志
     */
    public void sysJobLog() {
        SysJobLog.create()
                .where(QueryMethods.dateFormat(SysJobLog::getCreateTime, "%Y-%m-%d")
                        .ne(DateUtil.today()))
                .remove();
    }
}
